package com.eaoa.uc.busorder.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.eaoa.base.EABaseAction;
import com.eaoa.query.bus.BusOrderQuery;
import com.eaoa.uc.busorder.form.BusOrderUnValidateForm;
import com.eaoa.vo.bus.BusOrder;
import com.stony.core.util.CoreUtils;

public class BusOrderChargeModifyPreAction extends EABaseAction{

	@Override
	protected ActionForward doWork(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {

		BusOrderUnValidateForm myform = (BusOrderUnValidateForm)form;
		
		Long orderno = CoreUtils.parseLong(myform.getOrderno());
		
		if (orderno!=null) {
			BusOrder order = BusOrderQuery.loadByNo(orderno);
			if (!isReEntry(request)) {
				myform.setVO(order);
			}
		}
		
		return mapping.findForward("success");
	}
}
